package com.iris.live.services.data.models;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by DF on 9/14/2016.
 */
@Entity
@Table(name = "custom_reassign_log", schema = "sg_lsh", catalog = "")
public class CustomReassignLogModel {
    private int id;
    private Integer customCode;
    private String preAssignSc;
    private String lastUpdateUser;
    private Timestamp reassignDatetime;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "custom_code")
    public Integer getCustomCode() {
        return customCode;
    }

    public void setCustomCode(Integer customCode) {
        this.customCode = customCode;
    }

    @Basic
    @Column(name = "pre_assign_sc")
    public String getPreAssignSc() {
        return preAssignSc;
    }

    public void setPreAssignSc(String preAssignSc) {
        this.preAssignSc = preAssignSc;
    }

    @Basic
    @Column(name = "last_update_user")
    public String getLastUpdateUser() {
        return lastUpdateUser;
    }

    public void setLastUpdateUser(String lastUpdateUser) {
        this.lastUpdateUser = lastUpdateUser;
    }

    @Basic
    @Column(name = "reassign_datetime")
    public Timestamp getReassignDatetime() {
        return reassignDatetime;
    }

    public void setReassignDatetime(Timestamp reassignDatetime) {
        this.reassignDatetime = reassignDatetime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CustomReassignLogModel that = (CustomReassignLogModel) o;

        if (id != that.id) return false;
        if (customCode != null ? !customCode.equals(that.customCode) : that.customCode != null) return false;
        if (preAssignSc != null ? !preAssignSc.equals(that.preAssignSc) : that.preAssignSc != null) return false;
        if (lastUpdateUser != null ? !lastUpdateUser.equals(that.lastUpdateUser) : that.lastUpdateUser != null)
            return false;
        if (reassignDatetime != null ? !reassignDatetime.equals(that.reassignDatetime) : that.reassignDatetime != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (customCode != null ? customCode.hashCode() : 0);
        result = 31 * result + (preAssignSc != null ? preAssignSc.hashCode() : 0);
        result = 31 * result + (lastUpdateUser != null ? lastUpdateUser.hashCode() : 0);
        result = 31 * result + (reassignDatetime != null ? reassignDatetime.hashCode() : 0);
        return result;
    }
}
